#include "operacion.h"
#include <math.h>


Operacion::Operacion()
{
}
double Operacion::exp(double a, int b){

    double d=1;
    if(b<0){
        for(int c=0; c>b; c--){
        d=d/a;
        }
    }
    else{
        for(int c=0; c<b; c++){
        d=a*d;
        }
    }
    return d;
}
double Operacion::resta(double a, double b){
    return a-b;
}
double Operacion::suma(double a, double b){
    return a+b;
}
double Operacion::raiz(double a, double b){
      return pow(a,1/b);
}

